/************************************************************
 * Project Name		[Thinking_In_Java]
 * File Name     	[pkg_02_oop.inner_classes.Example_04_Local_Inner_Class.java]
 * Creation Date 	[21-Jun-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_02_oop.inner_classes;

/**
 * 局部内部类
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * 
 */
public class Example_04_Local_Inner_Class {

	private String name = "sean";

	/**
	 * method
	 * 
	 * @param i
	 *            测试变量
	 */
	public void method(final int i) {

		/**
		 * 局部内部类
		 * 
		 * @author 不落的太阳(Sean Yang)
		 * @version 1.0
		 * @since JDK 6
		 */
		class LocalInnerClass {
			public void method() {
				System.out.println(name);
				System.out.println(i);
			}
		}

		LocalInnerClass localInnerClass = new LocalInnerClass();
		localInnerClass.method();
	}

	/**
	 * 测试方法
	 * 
	 * @param args
	 *            命令行参数
	 */
	public static void main(String[] args) {
		new Example_04_Local_Inner_Class().method(10);
	}
}
